package com.ec.api.client;

import com.ec.api.config.FeignConfig;
import com.ec.common.domain.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "profile-service", configuration = FeignConfig.class)
public interface ElderProfileClient {
    /**
     * 更新老人状态（如：在住、退住、临时外出）
     */
    @PutMapping("/elderly/{id}/status/user_id")
    Result<Void> updateElderlyStatusByUserId(@PathVariable Long id, @RequestParam String status);

    /**
     * 更新老人床位ID
     */
    @PatchMapping("/elderly/{id}/bed")
    Result<Boolean> updateBedId(@PathVariable("id") Long id, @RequestParam("bedId") Long bedId);
}
